<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_MILEAGE_LANG_MILEAGE}></a>
  &raquo;&raquo; <a href="./index.php?action=MileList"><{$smarty.const._MI_MILEAGE_LANG_MILE_LIST}></a>
</div>

<h3>
  <{$smarty.const._MI_MILEAGE_LANG_MILE_LIST}>
  <{if $smarty.get.group && $cat && $cat[$smarty.get.group]}>
    &nbsp;&raquo;&nbsp;<{$smarty.get.group|intval}> : <{$cat[$smarty.get.group].cat_title|xoops_escape}>
  <{/if}>
</h3>

<ul class="toptab">
  <li><a href="index.php?action=MileEdit"><{$smarty.const._MI_MILEAGE_ADMENU_MILE_NEW}></a></li>
</ul>

<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>

<table class="outer">
  <thead>
    <tr>
      <th>
        <{$smarty.const._MD_MILEAGE_LANG_MILE_ID}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_MILE_ID}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_MILE_ID}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_NAME}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_NAME}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_NAME}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_POINT}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_POINT}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_POINT}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_URL}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_URL}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_URL}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_SUBURL}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_SUBURL}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_SUBURL}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_INTERVAL}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_INTERVAL}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_INTERVAL}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>

      <{if $cat}>
      <th>
        <{$smarty.const._MD_MILEAGE_LANG_GROUP}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_GROUP}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_GROUP}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>
      <{/if}>

      <th>
        <{$smarty.const._MD_MILEAGE_LANG_REG_UNIXTIME}><br />
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=<{$smarty.const.MILEAGE_MILE_SORT_KEY_REG_UNIXTIME}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderUrlForSort()}>&amp;<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.MILEAGE_MILE_SORT_KEY_REG_UNIXTIME}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a>
      </th>
      <th><{$smarty.const._MD_MILEAGE_LANG_CONTROL}></th>
    </tr>
  </thead>

  <tbody>
    <{foreach item=obj from=$objects}>
      <tr class="<{cycle values='odd,even'}>">
        <td><{$obj->getShow('mile_id')}></td>
        <td><{$obj->getShow('name')}></td>
        <td><{$obj->getShow('point')}></td>
        <td><{$obj->getShow('url')}></td>
        <td><{if $obj->getShow('suburl')==1}>YES<{else}>NO<{/if}></td>
        <td><{if $obj->get('interval')==0}><{$smarty.const._MD_MILEAGE_INTERVAL_0}><{elseif $obj->get('interval')==1}><{$smarty.const._MD_MILEAGE_INTERVAL_1}><{elseif $obj->get('interval')==2}><{$smarty.const._MD_MILEAGE_INTERVAL_2}><{elseif $obj->get('interval')==3}><{$smarty.const._MD_MILEAGE_INTERVAL_3}><{elseif $obj->get('interval')==4}><{$smarty.const._MD_MILEAGE_INTERVAL_4}><{elseif $obj->get('interval')==99}><{$smarty.const._MD_MILEAGE_INTERVAL_99}><{/if}></td>
        <{if $cat}>
          <td>
            <{if $obj->group_arr}>
              <{foreach from=$obj->group_arr item=group}>
                <{if $cat[$group].cat_title}>
                  <a href="./index.php?action=MileList&amp;group=<{$group|xoops_escape}>">
                    <{$group|xoops_escape}>:<{$cat[$group].cat_title|xoops_escape}>
                  </a><br />
                <{/if}>
              <{/foreach}>
            <{/if}>
          </td>
        <{/if}>
        <td><{$obj->get('reg_unixtime')|xoops_formattimestamp:l}></td>
        <td>
          <a href="./index.php?action=MileEdit&amp;mile_id=<{$obj->getShow('mile_id')}>"><img src="<{"icons/edit.gif"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
          <a href="./index.php?action=MileDelete&amp;mile_id=<{$obj->getShow('mile_id')}>"><img src="<{"icons/delete.gif"|theme}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /></a>
        </td>
      </tr>
    <{/foreach}>
  </tbody>

</table>

<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>
